<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>

<title>matrix_transform.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo-mini.png"/></td>
  
  
  
   
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">matrix_transform.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00060.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 
<a name="l00004"></a>00004 
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 
<a name="l00013"></a>00013 
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 
<a name="l00046"></a>00046 <span class="preprocessor">#ifndef GLM_GTC_matrix_transform</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define GLM_GTC_matrix_transform GLM_VERSION</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a>00049 <span class="comment">// Dependency:</span>
<a name="l00050"></a>00050 <span class="preprocessor">#include &quot;../glm.hpp&quot;</span>
<a name="l00051"></a>00051 
<a name="l00052"></a>00052 <span class="preprocessor">#if(defined(GLM_MESSAGES) &amp;&amp; !defined(glm_ext))</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#       pragma message(&quot;GLM: GLM_GTC_matrix_transform extension included&quot;)</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>
<a name="l00056"></a>00056 <span class="keyword">namespace </span>glm
<a name="l00057"></a>00057 {
<a name="l00060"></a>00060 
<a name="l00081"></a>00081         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; 
<a name="l00082"></a>00082         detail::tmat4x4&lt;T&gt; <a class="code" href="a00147.html#ga8925161ecc1767957900c5ca8b922dc4" title="Builds a translation 4 * 4 matrix created from a vector of 3 components.">translate</a>(
<a name="l00083"></a>00083                 detail::tmat4x4&lt;T&gt; <span class="keyword">const</span> &amp; m,
<a name="l00084"></a>00084                 detail::tvec3&lt;T&gt; <span class="keyword">const</span> &amp; v);
<a name="l00085"></a>00085                 
<a name="l00097"></a>00097         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; 
<a name="l00098"></a>00098         detail::tmat4x4&lt;T&gt; <a class="code" href="a00147.html#gaacb9cbe8f93a8fef9dc3e25559df19c0" title="Builds a rotation 4 * 4 matrix created from an axis vector and an angle expressed in degrees...">rotate</a>(
<a name="l00099"></a>00099                 detail::tmat4x4&lt;T&gt; <span class="keyword">const</span> &amp; m,
<a name="l00100"></a>00100                 T <span class="keyword">const</span> &amp; <a class="code" href="a00195.html#ga69041d18bd8539fe82d6170932d28362" title="Returns the quaternion rotation angle.">angle</a>, 
<a name="l00101"></a>00101                 detail::tvec3&lt;T&gt; <span class="keyword">const</span> &amp; <a class="code" href="a00195.html#ga72457604550d0414e522dbec0d98f276" title="Returns the q rotation axis.">axis</a>);
<a name="l00102"></a>00102 
<a name="l00113"></a>00113         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; 
<a name="l00114"></a>00114         detail::tmat4x4&lt;T&gt; <a class="code" href="a00147.html#ga223e08009f1cab54651200b81e91981c" title="Builds a scale 4 * 4 matrix created from 3 scalars.">scale</a>(
<a name="l00115"></a>00115                 detail::tmat4x4&lt;T&gt; <span class="keyword">const</span> &amp; m,
<a name="l00116"></a>00116                 detail::tvec3&lt;T&gt; <span class="keyword">const</span> &amp; v);
<a name="l00117"></a>00117 
<a name="l00129"></a>00129         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; 
<a name="l00130"></a>00130         detail::tmat4x4&lt;T&gt; <a class="code" href="a00147.html#gaf039a9f8d24e4bf39d30b7d692c1b8c3" title="Creates a matrix for an orthographic parallel viewing volume.">ortho</a>(
<a name="l00131"></a>00131                 T <span class="keyword">const</span> &amp; left, 
<a name="l00132"></a>00132                 T <span class="keyword">const</span> &amp; right, 
<a name="l00133"></a>00133                 T <span class="keyword">const</span> &amp; bottom, 
<a name="l00134"></a>00134                 T <span class="keyword">const</span> &amp; top, 
<a name="l00135"></a>00135                 T <span class="keyword">const</span> &amp; zNear, 
<a name="l00136"></a>00136                 T <span class="keyword">const</span> &amp; zFar);
<a name="l00137"></a>00137 
<a name="l00147"></a>00147         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; 
<a name="l00148"></a>00148         detail::tmat4x4&lt;T&gt; <a class="code" href="a00147.html#gaf039a9f8d24e4bf39d30b7d692c1b8c3" title="Creates a matrix for an orthographic parallel viewing volume.">ortho</a>(
<a name="l00149"></a>00149                 T <span class="keyword">const</span> &amp; left, 
<a name="l00150"></a>00150                 T <span class="keyword">const</span> &amp; right, 
<a name="l00151"></a>00151                 T <span class="keyword">const</span> &amp; bottom, 
<a name="l00152"></a>00152                 T <span class="keyword">const</span> &amp; top);
<a name="l00153"></a>00153 
<a name="l00164"></a>00164         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; 
<a name="l00165"></a>00165         detail::tmat4x4&lt;T&gt; <a class="code" href="a00147.html#ga2a5b0a83f78884d9cf3cc1ba99131299" title="Creates a frustum matrix.">frustum</a>(
<a name="l00166"></a>00166                 T <span class="keyword">const</span> &amp; left, 
<a name="l00167"></a>00167                 T <span class="keyword">const</span> &amp; right, 
<a name="l00168"></a>00168                 T <span class="keyword">const</span> &amp; bottom, 
<a name="l00169"></a>00169                 T <span class="keyword">const</span> &amp; top, 
<a name="l00170"></a>00170                 T <span class="keyword">const</span> &amp; near, 
<a name="l00171"></a>00171                 T <span class="keyword">const</span> &amp; far);
<a name="l00172"></a>00172 
<a name="l00181"></a>00181         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; 
<a name="l00182"></a>00182         detail::tmat4x4&lt;T&gt; <a class="code" href="a00147.html#ga283629a5ac7fb9037795435daf22560f" title="Creates a matrix for a symetric perspective-view frustum.">perspective</a>(
<a name="l00183"></a>00183                 T <span class="keyword">const</span> &amp; fovy, 
<a name="l00184"></a>00184                 T <span class="keyword">const</span> &amp; aspect, 
<a name="l00185"></a>00185                 T <span class="keyword">const</span> &amp; near, 
<a name="l00186"></a>00186                 T <span class="keyword">const</span> &amp; far);
<a name="l00187"></a>00187 
<a name="l00197"></a>00197         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt; 
<a name="l00198"></a>00198         detail::tmat4x4&lt;valType&gt; <a class="code" href="a00147.html#gac2bbb4ae38c7cc549feefae5406517d7" title="Builds a perspective projection matrix based on a field of view.">perspectiveFov</a>(
<a name="l00199"></a>00199                 valType <span class="keyword">const</span> &amp; fov, 
<a name="l00200"></a>00200                 valType <span class="keyword">const</span> &amp; width, 
<a name="l00201"></a>00201                 valType <span class="keyword">const</span> &amp; height, 
<a name="l00202"></a>00202                 valType <span class="keyword">const</span> &amp; near, 
<a name="l00203"></a>00203                 valType <span class="keyword">const</span> &amp; far);
<a name="l00204"></a>00204 
<a name="l00212"></a>00212     <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; 
<a name="l00213"></a>00213         detail::tmat4x4&lt;T&gt; <a class="code" href="a00147.html#ga414f3cfe1af5619acebd5c28cf6bd45c" title="Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.">infinitePerspective</a>(
<a name="l00214"></a>00214                 T fovy, T aspect, T near);
<a name="l00215"></a>00215 
<a name="l00223"></a>00223     <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; 
<a name="l00224"></a>00224         detail::tmat4x4&lt;T&gt; <a class="code" href="a00147.html#ga42299b3ef778f1d6120032da73b0ef87" title="Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics har...">tweakedInfinitePerspective</a>(
<a name="l00225"></a>00225                 T fovy, T aspect, T near);
<a name="l00226"></a>00226 
<a name="l00236"></a>00236         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> U&gt; 
<a name="l00237"></a>00237         detail::tvec3&lt;T&gt; <a class="code" href="a00147.html#ga6f081067aeffc662410dfbabb25f9fdc" title="Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.">project</a>(
<a name="l00238"></a>00238                 detail::tvec3&lt;T&gt; <span class="keyword">const</span> &amp; obj, 
<a name="l00239"></a>00239                 detail::tmat4x4&lt;T&gt; <span class="keyword">const</span> &amp; model, 
<a name="l00240"></a>00240                 detail::tmat4x4&lt;T&gt; <span class="keyword">const</span> &amp; <a class="code" href="a00194.html#ga08294223071a96e777de7033cc708439" title="Projects x on Normal.">proj</a>, 
<a name="l00241"></a>00241                 detail::tvec4&lt;U&gt; <span class="keyword">const</span> &amp; viewport);
<a name="l00242"></a>00242 
<a name="l00252"></a>00252         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> U&gt; 
<a name="l00253"></a>00253         detail::tvec3&lt;T&gt; <a class="code" href="a00147.html#ga540d5f6bb3f41e5dfa38d6ebd8771765" title="Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.">unProject</a>(
<a name="l00254"></a>00254                 detail::tvec3&lt;T&gt; <span class="keyword">const</span> &amp; win, 
<a name="l00255"></a>00255                 detail::tmat4x4&lt;T&gt; <span class="keyword">const</span> &amp; model, 
<a name="l00256"></a>00256                 detail::tmat4x4&lt;T&gt; <span class="keyword">const</span> &amp; <a class="code" href="a00194.html#ga08294223071a96e777de7033cc708439" title="Projects x on Normal.">proj</a>, 
<a name="l00257"></a>00257                 detail::tvec4&lt;U&gt; <span class="keyword">const</span> &amp; viewport);
<a name="l00258"></a>00258 
<a name="l00267"></a>00267         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> U&gt; 
<a name="l00268"></a>00268         detail::tmat4x4&lt;T&gt; <a class="code" href="a00147.html#ga4e9a9a432ffd6c458b75da1553d22476" title="Define a picking region.">pickMatrix</a>(
<a name="l00269"></a>00269                 detail::tvec2&lt;T&gt; <span class="keyword">const</span> &amp; center, 
<a name="l00270"></a>00270                 detail::tvec2&lt;T&gt; <span class="keyword">const</span> &amp; delta, 
<a name="l00271"></a>00271                 detail::tvec4&lt;U&gt; <span class="keyword">const</span> &amp; viewport);
<a name="l00272"></a>00272 
<a name="l00280"></a>00280         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; 
<a name="l00281"></a>00281         detail::tmat4x4&lt;T&gt; <a class="code" href="a00147.html#gae2dca3785b6d5796e876114af58a60a1" title="Build a look at view matrix.">lookAt</a>(
<a name="l00282"></a>00282                 detail::tvec3&lt;T&gt; <span class="keyword">const</span> &amp; eye, 
<a name="l00283"></a>00283                 detail::tvec3&lt;T&gt; <span class="keyword">const</span> &amp; center, 
<a name="l00284"></a>00284                 detail::tvec3&lt;T&gt; <span class="keyword">const</span> &amp; up);
<a name="l00285"></a>00285 
<a name="l00287"></a>00287 }<span class="comment">//namespace glm</span>
<a name="l00288"></a>00288 
<a name="l00289"></a>00289 <span class="preprocessor">#include &quot;matrix_transform.inl&quot;</span>
<a name="l00290"></a>00290 
<a name="l00291"></a>00291 <span class="preprocessor">#endif//GLM_GTC_matrix_transform</span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
